home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / interfaces / PInterface Translator / OCE Interfaces / OCEStandardMail.p < prev    next >
Encoding:
Text File  |  1993-09-16  |  17.5 KB  |  623 lines  |  [TEXT/MPS ]

  1. {***********************************************************
  2.  
  3. Created: Saturday, February 13, 1993 at 1:55PM
  4.  OCEStandardMail.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.     ••• Apple Confidential •••
  8.     ••• Provided with AOCE Beta seed under license agreement with   •••
  9.     ••• Apple Computer, Inc.  Use for any purpose other than        •••
  10.     ••• development of AOCE-based Macintosh products is a violation •••
  11.     ••• of the license agreement.                                   •••
  12.  
  13.   Copyright Apple Computer, Inc. 1990-1993
  14.   All rights reserved
  15.  
  16. ***********************************************************}
  17.  
  18.  
  19. {$IFC UNDEFINED UsingIncludes}
  20. {$SETC UsingIncludes:= 0}
  21. {$ENDC}
  22.  
  23. {$IFC NOT UsingIncludes}
  24.     UNIT OCEStandardMail;
  25.     INTERFACE
  26. {$ENDC}
  27.  
  28. {$IFC UNDEFINED UsingOCEStandardMail}
  29. {$SETC UsingOCEStandardMail:= 1}
  30.  
  31. {$I+}
  32. {$SETC OCEStandardMailIncludes:= UsingIncludes}
  33. {$SETC UsingIncludes:= 1}
  34.  
  35.  
  36. {$IFC UNDEFINED UsingAppleEvents}
  37. {$I $$Shell(PInterfaces)AppleEvents.p}
  38. {$ENDC}
  39.  
  40. {$IFC UNDEFINED UsingFiles}
  41. {$I $$Shell(PInterfaces)Files.p}
  42. {$ENDC}
  43.  
  44. {$IFC UNDEFINED UsingOCEAuthDir}
  45. {$I OCEAuthDir.p}
  46. {$ENDC}
  47.  
  48. {$IFC UNDEFINED UsingOCEMail}
  49. {$I OCEMail.p}
  50. {$ENDC}
  51.  
  52. {$IFC UNDEFINED UsingWindows}
  53. {$I $$Shell(PInterfaces)Windows.p}
  54. {$ENDC}
  55.  
  56. {$IFC UNDEFINED UsingDialogs}
  57. {$I $$Shell(PInterfaces)Dialogs.p}
  58. {$ENDC}
  59.  
  60. {$SETC UsingIncludes:= OCEStandardMailIncludes}
  61.  
  62.  
  63.  
  64.  
  65. CONST
  66. gestaltSMPMailerVersion            = 'malr';
  67. gestaltSMPSPSendLetterVersion    = 'spsl';
  68.  
  69. kSMPVersion = 1;
  70.  
  71. TYPE
  72. LetterSpec = RECORD
  73.     spec: ARRAY[1..3] OF LONGINT;
  74.     END;
  75.  
  76. CONST
  77. typeLetterSpec        = 'lttr';
  78.  
  79. { Wildcard used for filtering letter types. }
  80.  
  81. CONST
  82. FilterAnyLetter                =    'ltr*';
  83. FilterAppleLetterContent    =    'ltc*';
  84. FilterImageContent            =    'lti*';
  85.  
  86. TYPE
  87. LetterDescriptor = RECORD
  88.     onDisk: BOOLEAN;
  89.     CASE INTEGER OF
  90.         1:    (fileSpec: FSSpec);
  91.         2:    (mailboxSpec: LetterSpec);
  92.     END;
  93.  
  94.  
  95.  
  96. {
  97. SMPPSendAs values.  You may add the following values together to determine how the
  98. file is sent, but you may not set both kSMPSendAsEnclosureMask and kSMPSendFileOnlyMask.  This
  99. will allow you to send the letter as an image so that it will work with fax gateways
  100. and send as an enclosure as well.
  101. }
  102.  
  103. CONST
  104. kSMPSendAsEnclosureBit    = 0;            { Appears as letter with enclosures }
  105. kSMPSendFileOnlyBit        = 1;            { Appears as a file in mailbox. }
  106. kSMPSendAsImageBit        = 2;            { Content imaged in letter }
  107.  
  108.  
  109. { Values of SMPPSendAs }
  110. kSMPSendAsEnclosureMask    = $01;  {1<<kSMPSendAsEnclosureBit}
  111. kSMPSendFileOnlyMask    = $02;  {1<<kSMPSendFileOnlyBit}
  112. kSMPSendAsImageMask        = $04;  {1<<kSMPSendAsImageBit}
  113.  
  114.  
  115. TYPE
  116. SMPPSendAs = Byte;
  117.  
  118.  
  119. { Send Package Structures }
  120.  
  121. SMPDrawImageProcPtr = ProcPtr;
  122.     { FUNCTION SMPDrawImageProcPtr(refcon: LONGINT; inColor: BOOLEAN): void;}
  123.  
  124. SMPRecipientDescriptor = RECORD
  125.     next: ^SMPRecipientDescriptor;        {  Q-Link. }
  126.     result: OSErr;                        {  result code when using the object. }
  127.     recipient: ^OCEPackedRecipient;        {  Pointer to a Packed Address. }
  128.     size: LONGINT;                        {  length of recipient in bytes. }
  129.     theAddress: MailRecipient;            {  structure points into recipient and theRID. }
  130.     theRID: RecordID;                    {  structure points into recipient. }
  131.     END;
  132.  
  133. SMPRecipientDescriptorPtr = ^SMPRecipientDescriptor;
  134.  
  135. SMPEnclosureDescriptor = RECORD
  136.     next: ^SMPEnclosureDescriptor;
  137.     result: OSErr;
  138.     fileSpec: FSSpec;
  139.     fileCreator: OSType;                {  Creator of this enclosure. }
  140.     fileType: OSType;                    {  File Type of this enclosure. }
  141.     END;
  142.  
  143. SMPEnclosureDescriptorPtr = ^SMPEnclosureDescriptor;
  144.  
  145. SMPLetterPB = PACKED RECORD
  146.     result: OSErr;                        { result of operation }
  147.     subject: RStringPtr;                { RString }
  148.     senderIdentity: AuthIdentity;        { Letter is sent from this Identity }
  149.     toList: SMPRecipientDescriptorPtr;    { Pointer to linked list }
  150.     ccList: SMPRecipientDescriptorPtr;    { Pointer to linked list }
  151.     bccList: SMPRecipientDescriptorPtr;    { Pointer to linked list }
  152.     script: ScriptCode;                    { Identifier for language }
  153.     textSize: Size;                        { length of body data }
  154.     textBuffer: Ptr;                    { body of the letter }
  155.     sendAs: SMPPSendAs;                    { Send as Letter, Enclosure, Image }
  156.     padByte: Byte;
  157.     enclosures: SMPEnclosureDescriptorPtr;    { files to be enclosed }
  158.     drawImageProc: SMPDrawImageProcPtr;    { For imaging }
  159.     imageRefCon: LONGINT;                { For imaging }
  160.     supportsColor: BOOLEAN;                { For imaging - set to true if you application supports color imaging }
  161.     END;
  162.  
  163. SMPLetterPBPtr = ^SMPLetterPB;
  164.  
  165. CONST
  166. kSMPAppMustHandleEventBit = 0;
  167. kSMPAppShouldIgnoreEventBit = 1;
  168. kSMPContractedBit = 2;
  169. kSMPExpandedBit = 3;
  170. kSMPMailerBecomesTargetBit = 4;
  171. kSMPAppBecomesTargetBit = 5;
  172. kSMPCursorOverMailerBit = 6;
  173. kSMPCreateCopyWindowBit = 7;
  174. kSMPDisposeCopyWindowBit = 8;
  175. { Values of SMPMailerResult }
  176. kSMPAppMustHandleEventMask        = $00000001;    {1<<kSMPAppMustHandleEventBit}
  177. kSMPAppShouldIgnoreEventMask    = $00000002;    {1<<kSMPAppShouldIgnoreEventBit}
  178. kSMPContractedMask                = $00000004;    {1<<kSMPContractedBit}
  179. kSMPExpandedMask                = $00000008;    {1<<kSMPExpandedBit}
  180. kSMPMailerBecomesTargetMask        = $00000010;    {1<<kSMPMailerBecomesTargetBit}
  181. kSMPAppBecomesTargetMask        = $00000020;    {1<<kSMPAppBecomesTargetBit}
  182. kSMPCursorOverMailerMask        = $00000040;    {1<<kSMPCursorOverMailerBit}
  183. kSMPCreateCopyWindowMask        = $00000080;    {1<<kSMPCreateCopyWindowBit}
  184. kSMPDisposeCopyWindowMask        = $00000100;    {1<<kSMPDisposeCopyWindowBit}
  185.  
  186.  
  187. TYPE
  188. SMPMailerResult = LONGINT;
  189.  
  190. CONST
  191. { Values of SMPMailerComponent}
  192. kSMPOther            =    -1;
  193. kSMPFrom            =    32;
  194. kSMPTo                =    20;
  195. kSMPRegarding        =    22;
  196. kSMPSendDateTime    =    29;
  197. kSMPAttachments        =    26;
  198. kSMPAddressOMatic    =    16;
  199.  
  200.  
  201. TYPE
  202. SMPMailerComponent = LONGINT;
  203.  
  204.  
  205. CONST
  206. kSMPToAddress        =    kMailToBit;
  207. kSMPCCAddress        =    kMailCcBit;
  208. kSMPBCCAddress        =    kMailBccBit;
  209.  
  210.  
  211. TYPE
  212. SMPAddressType = MailAttributeID;
  213.  
  214.  
  215. CONST
  216. kSMPUndoCommand = 0;
  217. kSMPCutCommand = 1;
  218. kSMPCopyCommand = 2;
  219. kSMPPasteCommand = 3;
  220. kSMPClearCommand = 4;
  221. kSMPSelectAllCommand = 5;
  222.  
  223.  
  224. TYPE
  225. SMPEditCommand = INTEGER;
  226.  
  227. CONST
  228. kSMPUndoDisabled = 0;
  229. kSMPAppMayUndo = 1;
  230. kSMPMailerUndo = 2;
  231.  
  232.  
  233. TYPE
  234. SMPUndoState = INTEGER;
  235.  
  236.  
  237.  
  238. {
  239. SMPSendFormatMask:
  240.  
  241. Bitfield indicating which combinations of formats are included in,
  242. should be included or, or can be included in a letter.
  243. }
  244.         
  245. CONST
  246. kSMPNativeBit                = 0;
  247. kSMPImageBit                = 1;
  248. kSMPStandardInterchangeBit    = 2;
  249.  
  250. { Values of SMPSendFormatMask }
  251. CONST
  252. kSMPNativeMask                = $00000001;  {1<<kSMPNativeBit}
  253. kSMPImageMask                = $00000002;  {1<<kSMPImageBit}
  254. kSMPStandardInterchangeMask    = $00000004;  {1<<kSMPStandardInterchangeBit}
  255.  
  256. TYPE
  257. SMPSendFormatMask = LONGINT;
  258.  
  259.  
  260.  
  261. {
  262.     Pseudo-events passed to the clients filter proc for initialization and cleanup.
  263. }
  264. CONST
  265. kSMPSendOptionsStart    = -1;
  266. kSMPSendOptionsEnd        = -2;
  267.  
  268.  
  269. {
  270. SMPSendFormatMask:
  271.  
  272. Structure describing the format of a letter.  If kSMPNativeMask bit is set, the whichNativeFormat field indicates which of the client-defined formats to use.
  273. }
  274.         
  275.  
  276. TYPE SMPSendFormat = RECORD
  277.     whichFormats: SMPSendFormatMask;
  278.     whichNativeFormat: INTEGER;        { 0 based }
  279. END;
  280.  
  281. SMPLetterInfo = RECORD
  282.     letterCreator: OSType;
  283.     letterType: OSType;
  284.     subject: RString32;
  285.     sender: RString32;
  286. END;
  287.  
  288. CONST
  289. kSMPSave = 0;
  290. kSMPSaveAs = 1;
  291. kSMPSaveACopy = 2;
  292.  
  293.  
  294. TYPE
  295. SMPSaveType = INTEGER;
  296.  
  297.  
  298.  
  299. FrontWindowProcPtr = ProcPtr;
  300.     { FUNCTION FrontWindowProcPtr(clientData: LONGINT): WindowPtr;}
  301.  
  302. PrepareMailerForDrawingProcPtr = ProcPtr;
  303.     { FUNCTION PrepareMailerForDrawingProcPtr(
  304.         window: WindowPtr; clientData: LONGINT): void;}
  305.  
  306. SendOptionsFilterProc = ProcPtr;
  307.     { FUNCTION SendOptionsFilterProc(theDialog: DialogPtr; VAR theEvent: EventRecord;
  308.         itemHit: INTEGER; clientData: LONGINT): BOOLEAN;}
  309.  
  310. CONST
  311. kSMPGetDimensions            = 4700;
  312. kSMPNewMailer                = 4701;
  313. kSMPDisposeMailer            = 4702;
  314. kSMPMailerEvent                = 4703;
  315. kSMPMailerEditCommand        = 4704;
  316. kSMPMailerForward            = 4705;
  317. kSMPMailerReply                = 4706;
  318. kSMPGetMailerState            = 4707;
  319. kSMPPrepareCoverPages        = 4708;
  320. kSMPDrawNthCoverPage        = 4709;
  321. kSMPBeginSave                = 4710;
  322. kSMPBeginSend                = 4711;
  323. kSMPOpenLetter                = 4712;
  324. kSMPDrawMailer                = 4713;
  325. kSMPMoveMailer                = 4714;
  326. kSMPSetSubject                = 4715;
  327. kSMPSetFromIdentity            = 4716;
  328. kSMPAddAddress                = 4717;
  329. kSMPAddAttachment            = 4718;
  330. kSMPContentChanged            = 4719;
  331. kSMPEndSave                    = 4720;
  332. kSMPEndSend                    = 4721;
  333. kSMPExpandOrContract        = 4722;
  334. kSMPBecomeTarget            = 4723;
  335. kSMPGetTabInfo                = 4724;
  336. kSMPClearUndo                = 4725;
  337. kSMPAttachDialog            = 4726;
  338. kSMPGetComponentSize        = 4727;
  339. kSMPGetComponentInfo        = 4728;
  340. kSMPGetListItemInfo            = 4729;
  341. kSMPAddContent                = 4730;
  342. kSMPReadContent                = 4731;
  343. kSMPGetFontNameFromLetter    = 4732;
  344. kSMPAddMainEnclosure        = 4733;
  345. kSMPGetMainEnclosureFSSpec    = 4734;
  346. kSMPAddBlock                = 4735;
  347. kSMPReadBlock                = 4736;
  348. kSMPEnumerateBlocks            = 4737;
  349. kSMPImage                    = 4738;
  350. kSMPInitMailer                = 4741;
  351. kSMPGetNextLetter            = 4742;
  352. kSMPPrepareToClose            = 4743;
  353. kSMPCloseOptions            = 4744;
  354. kSMPPrepareToChange            = 4745;
  355. kSMPGetLetterInfo            = 4746;
  356. kSMPSendOptionsDialog        = 5000;
  357.  
  358.  
  359. TYPE
  360. SMPMailerState = RECORD
  361.     mailerCount: INTEGER;
  362.     currentMailer: INTEGER;
  363.     upperLeft: Point;
  364.     hasBeenReceived: BOOLEAN;
  365.     isTarget: BOOLEAN;
  366.     isExpanded: BOOLEAN;
  367.     {padByte2: Byte;}
  368.     changeCount: LONGINT;
  369.     targetComponent: SMPMailerComponent;
  370.     canCut: BOOLEAN;
  371.     canCopy: BOOLEAN;
  372.     canPaste: BOOLEAN;
  373.     canClear: BOOLEAN;
  374.     canSelectAll: BOOLEAN;
  375.     {padByte3: Byte;}
  376.     undoState: SMPUndoState;
  377.     undoWhat: Str63;
  378.     END;
  379.  
  380.  
  381. SMPSendOptions = RECORD
  382.     version: LONGINT;
  383.     archiveWhenSent: BOOLEAN;
  384.     signWhenSent: BOOLEAN;
  385.     priority: IPMPriority;
  386.     END;
  387.  
  388. SMPSendOptionsPtr = ^SMPSendOptions;
  389. SMPSendOptionsHandle = ^SMPSendOptionsPtr;
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396. {----------------------------------------------------------------------------------------
  397.     Send Package Routines
  398. ----------------------------------------------------------------------------------------}
  399. CONST
  400. kSMPSendLetter                = 500;
  401. kSMPResolveToRecipient        = 1100;
  402.  
  403. kSMPNewPage                    = 2100;
  404. kSMPImageErr                = 2101;
  405.  
  406.  
  407.  
  408.  
  409. FUNCTION SMPSendLetter(theLetter: SMPLetterPBPtr): OSErr;
  410.     INLINE $203C, 2, kSMPSendLetter, $AA5D;
  411.  
  412. FUNCTION SMPNewPage(VAR newHeader: OpenCPicParams): OSErr;
  413.     INLINE $203C, 2, kSMPNewPage, $AA5D;
  414.  
  415. FUNCTION SMPImageErr: OSErr;
  416.     INLINE $203C, 0, kSMPImageErr, $AA5D;
  417.  
  418. FUNCTION SMPResolveToRecipient(dsSpec: PackedDSSpecPtr;
  419.     VAR recipientList: SMPRecipientDescriptorPtr; identity: AuthIdentity): OSErr;
  420.     INLINE $203C, 6, kSMPResolveToRecipient, $AA5D;
  421.  
  422.  
  423.  
  424. FUNCTION SMPInitMailer: OSErr;
  425.     INLINE $203C, 0, kSMPInitMailer, $AA5D;
  426.  
  427. FUNCTION SMPGetDimensions(VAR width: INTEGER; VAR contractedHeight: INTEGER;
  428.     VAR expandedHeight: INTEGER): OSErr;
  429.     INLINE $203C, 6, kSMPGetDimensions, $AA5D;
  430.  
  431. FUNCTION SMPGetTabInfo(VAR firstTab: SMPMailerComponent;
  432.     VAR lastTab: SMPMailerComponent): OSErr;
  433.     INLINE $203C, 4, kSMPGetTabInfo, $AA5D;
  434.  
  435. FUNCTION SMPNewMailer(window: WindowPtr; upperLeft: Point; canContract: BOOLEAN;
  436.     initiallyExpanded: BOOLEAN; identity: AuthIdentity;
  437.     prepareMailerForDrawingCB: PrepareMailerForDrawingProcPtr;
  438.     clientData: LONGINT): OSErr;
  439.     INLINE $203C, 12, kSMPNewMailer, $AA5D;
  440.  
  441. FUNCTION SMPPrepareToClose(window: WindowPtr): OSErr;
  442.     INLINE $203C, 2, kSMPPrepareToClose, $AA5D;
  443.  
  444. FUNCTION SMPCloseOptions(window: WindowPtr): OSErr;
  445.     INLINE $203C, 2, kSMPCloseOptions, $AA5D;
  446.  
  447. FUNCTION SMPDisposeMailer(window: WindowPtr; useCloseOptions: BOOLEAN): OSErr;
  448.     INLINE $203C, 3, kSMPDisposeMailer, $AA5D;
  449.  
  450. FUNCTION SMPMailerEvent(event: EventRecord; VAR whatHappened: SMPMailerResult;
  451.     frontWindowCB: FrontWindowProcPtr; clientData: LONGINT): OSErr;
  452.     INLINE $203C, 8, kSMPMailerEvent, $AA5D;
  453.  
  454. FUNCTION SMPClearUndo(window: WindowPtr): OSErr;
  455.     INLINE $203C, 2, kSMPClearUndo, $AA5D;
  456.  
  457.  
  458. FUNCTION SMPMailerEditCommand(window: WindowPtr; command: SMPEditCommand;
  459.     VAR whatHappened: SMPMailerResult): OSErr;
  460.     INLINE $203C, 5, kSMPMailerEditCommand, $AA5D;
  461.  
  462. FUNCTION SMPMailerForward(window: WindowPtr; from: AuthIdentity): OSErr;
  463.     INLINE $203C, 4, kSMPMailerForward, $AA5D;
  464.  
  465. FUNCTION SMPMailerReply(originalLetter: WindowPtr; newLetter: WindowPtr;
  466.     replyToAll: BOOLEAN; upperLeft: Point; canContract: BOOLEAN;
  467.     initiallyExpanded: BOOLEAN; identity: AuthIdentity;
  468.     prepareMailerForDrawingCB: PrepareMailerForDrawingProcPtr;
  469.     clientData: LONGINT): OSErr;
  470.     INLINE $203C, 15, kSMPMailerReply, $AA5D;
  471.  
  472. FUNCTION SMPGetMailerState(window: WindowPtr; VAR itsState: SMPMailerState): OSErr;
  473.     INLINE $203C, 4, kSMPGetMailerState, $AA5D;
  474.  
  475. FUNCTION SMPSendOptionsDialog(window: WindowPtr; documentName: Str255;
  476.     VAR nativeFormatNames: StringPtr; nameCount: INTEGER;
  477.     canSend: SMPSendFormatMask; VAR currentFormat: SMPSendFormat;
  478.     filterProc: SendOptionsFilterProc; clientData: LONGINT;
  479.     VAR shouldSend: SMPSendFormat; VAR sendOptions: SMPSendOptionsHandle): OSErr;
  480.     INLINE $203C, 19, kSMPSendOptionsDialog, $AA5D;
  481.  
  482. FUNCTION SMPPrepareCoverPages(window: WindowPtr; VAR pageCount: INTEGER): OSErr;
  483.     INLINE $203C, 4, kSMPPrepareCoverPages, $AA5D;
  484.  
  485. FUNCTION SMPDrawNthCoverPage(window: WindowPtr; pageNumber: INTEGER;
  486.     doneDrawingCoverPages: BOOLEAN): OSErr;
  487.     INLINE $203C, 4, kSMPDrawNthCoverPage, $AA5D;
  488.  
  489. FUNCTION SMPPrepareToChange(window: WindowPtr): OSErr;
  490.     INLINE $203C, 2, kSMPPrepareToChange, $AA5D;
  491.  
  492. FUNCTION SMPContentChanged(window: WindowPtr): OSErr;
  493.     INLINE $203C, 2, kSMPContentChanged, $AA5D;
  494.  
  495. FUNCTION SMPBeginSave(window: WindowPtr; diskLetter: FSSpec;
  496.     creator: OSType; fileType: OSType; saveType: SMPSaveType;
  497.     VAR mustAddContent: BOOLEAN): OSErr;
  498.     INLINE $203C, 11, kSMPBeginSave, $AA5D;
  499.  
  500. FUNCTION SMPEndSave(window: WindowPtr; okToSave: BOOLEAN): OSErr;
  501.     INLINE $203C, 3, kSMPEndSave, $AA5D;
  502.  
  503. FUNCTION SMPBeginSend(window: WindowPtr; creator: OSType; fileType: OSType;
  504.     sendOptions: SMPSendOptionsHandle; VAR mustAddContent: BOOLEAN): OSErr;
  505.     INLINE $203C, 10, kSMPBeginSend, $AA5D;
  506.  
  507. FUNCTION SMPEndSend(window: WindowPtr; okToSend: BOOLEAN): OSErr;
  508.     INLINE $203C, 3, kSMPEndSend, $AA5D;
  509.  
  510. FUNCTION SMPOpenLetter(letter: LetterDescriptor;
  511.     window: WindowPtr; upperLeft: Point; canContract: BOOLEAN;
  512.     initiallyExpanded: BOOLEAN;
  513.     prepareMailerForDrawingCB: PrepareMailerForDrawingProcPtr;
  514.     clientData: LONGINT): OSErr;
  515.     INLINE $203C, 12, kSMPOpenLetter, $AA5D;
  516.  
  517. FUNCTION SMPAddMainEnclosure(window: WindowPtr; enclosure: FSSpec): OSErr;
  518.     INLINE $203C, 4, kSMPAddMainEnclosure, $AA5D;
  519.  
  520. FUNCTION SMPGetMainEnclosureFSSpec(window: WindowPtr; VAR enclosureDir: FSSpec): OSErr;
  521.     INLINE $203C, 4, kSMPGetMainEnclosureFSSpec, $AA5D;
  522.  
  523. FUNCTION SMPAddContent(window: WindowPtr; segmentType: MailSegmentType;
  524.     appendFlag: BOOLEAN; buffer: UNIV Ptr; bufferSize: LONGINT;
  525.     VAR textScrap: StScrpRec; startNewScript: BOOLEAN; script: ScriptCode;
  526.     isLastSegment: BOOLEAN): OSErr;
  527.     INLINE $203C, 13, kSMPAddContent, $AA5D;
  528.  
  529. FUNCTION SMPReadContent(window: WindowPtr; segmentTypeMask: MailSegmentMask;
  530.     buffer: UNIV Ptr; bufferSize: LONGINT; VAR dataSize: LONGINT;
  531.     VAR textScrap: StScrpRec; VAR script: ScriptCode; VAR segmentType: MailSegmentType;
  532.     VAR endOfScript: BOOLEAN; VAR endOfSegment: BOOLEAN; VAR endOfContent: BOOLEAN): OSErr;
  533.     INLINE $203C, 21, kSMPReadContent, $AA5D;
  534.  
  535. FUNCTION SMPGetFontNameFromLetter(window: WindowPtr; fontNum: INTEGER;
  536.     fontName: Str255; doneWithFontTable: BOOLEAN): OSErr;
  537.     INLINE $203C, 6, kSMPGetFontNameFromLetter, $AA5D;
  538.  
  539. FUNCTION SMPAddBlock(window: WindowPtr; blockType: OCECreatorType;
  540.     append: BOOLEAN; buffer: UNIV Ptr; bufferSize: LONGINT;
  541.     mode: MailBlockMode; offset: LONGINT): OSErr;
  542.     INLINE $203C, 12, kSMPAddBlock, $AA5D;
  543.  
  544. FUNCTION SMPReadBlock(window: WindowPtr; blockType: OCECreatorType;
  545.     blockIndex: INTEGER; buffer: UNIV Ptr; bufferSize: LONGINT;
  546.     dataOffset: LONGINT; VAR dataSize: LONGINT; VAR endOfBlock: BOOLEAN;
  547.     VAR remaining: LONGINT): OSErr;
  548.     INLINE $203C, 17, kSMPReadBlock, $AA5D;
  549.  
  550. FUNCTION SMPEnumerateBlocks(window: WindowPtr; startIndex: INTEGER;
  551.     buffer: UNIV Ptr; bufferSize: LONGINT; VAR dataSize: LONGINT;
  552.     VAR nextIndex: INTEGER; VAR more: BOOLEAN): OSErr;
  553.     INLINE $203C, 13, kSMPEnumerateBlocks, $AA5D;
  554.  
  555. FUNCTION SMPDrawMailer(window: WindowPtr): OSErr;
  556.     INLINE $203C, 2, kSMPDrawMailer, $AA5D;
  557.  
  558.  
  559. FUNCTION SMPSetSubject(window: WindowPtr; text: RString): OSErr;
  560.     INLINE $203C, 4, kSMPSetSubject, $AA5D;
  561.  
  562. FUNCTION SMPSetFromIdentity(window: WindowPtr; from: AuthIdentity): OSErr;
  563.     INLINE $203C, 4, kSMPSetFromIdentity, $AA5D;
  564.  
  565. FUNCTION SMPAddAddress(window: WindowPtr; addrType: SMPAddressType;
  566.     VAR address: OCEPackedRecipient): OSErr;
  567.     INLINE $203C, 5, kSMPAddAddress, $AA5D;
  568.  
  569. FUNCTION SMPAddAttachment(window: WindowPtr; attachment: FSSpec): OSErr;
  570.     INLINE $203C, 4, kSMPAddAttachment, $AA5D;
  571.  
  572. FUNCTION SMPAttachDialog(window: WindowPtr): OSErr;
  573.     INLINE $203C, 2, kSMPAttachDialog, $AA5D;
  574.  
  575.  
  576. FUNCTION SMPExpandOrContract(window: WindowPtr; expand: BOOLEAN): OSErr;
  577.     INLINE $203C, 3, kSMPExpandOrContract, $AA5D;
  578.  
  579.  
  580. FUNCTION SMPMoveMailer(window: WindowPtr; dh: INTEGER; dv: INTEGER): OSErr;
  581.     INLINE $203C, 4, kSMPMoveMailer, $AA5D;
  582.  
  583.  
  584. FUNCTION SMPBecomeTarget(window: WindowPtr; becomeTarget: BOOLEAN;
  585.     whichField: SMPMailerComponent): OSErr;
  586.     INLINE $203C, 5, kSMPBecomeTarget, $AA5D;
  587.  
  588.  
  589. FUNCTION SMPGetComponentSize(window: WindowPtr; whichMailer: INTEGER;
  590.     whichField: SMPMailerComponent; VAR size: INTEGER): OSErr;
  591.     INLINE $203C, 7, kSMPGetComponentSize, $AA5D;
  592.  
  593.  
  594. FUNCTION SMPGetComponentInfo(window: WindowPtr; whichMailer: INTEGER;
  595.     whichField: SMPMailerComponent; buffer: UNIV Ptr): OSErr;
  596.     INLINE $203C, 7, kSMPGetComponentInfo, $AA5D;
  597.  
  598.  
  599. FUNCTION SMPGetListItemInfo(window: WindowPtr; whichMailer: INTEGER;
  600.     whichField: SMPMailerComponent; buffer: UNIV Ptr; bufferLength: LONGINT;
  601.     startItem: INTEGER; VAR itemCount: INTEGER;
  602.     VAR nextItem: INTEGER; VAR more: BOOLEAN): OSErr;
  603.     INLINE $203C, 16, kSMPGetListItemInfo, $AA5D;
  604.  
  605. FUNCTION SMPImage(
  606.     window: WindowPtr; drawImageProc: SMPDrawImageProcPtr;
  607.     imageRefCon: LONGINT; supportsColor: BOOLEAN): OSErr;
  608.     INLINE $203C, 7, kSMPImage, $AA5D;
  609.  
  610. FUNCTION SMPGetNextLetter(VAR typesList: OSType; numTypes: INTEGER;
  611.     VAR adjacentLetter: LetterDescriptor): OSErr;
  612.     INLINE $203C, 5, kSMPGetNextLetter, $AA5D;
  613.  
  614. FUNCTION SMPGetLetterInfo(VAR mailboxSpec: LetterSpec; 
  615.     VAR info: SMPLetterInfo): OSErr;
  616.     INLINE $203C, 4, kSMPGetLetterInfo, $AA5D;
  617.  
  618. {$ENDC}    { UsingOCEStandardMail }
  619.  
  620. {$IFC NOT UsingIncludes}
  621.     END.
  622. {$ENDC}
  623.